home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / programr / mathstud.zip / WBARTLET.M < prev    next >
Text File  |  1993-03-23  |  280b  |  16 lines

  1. function y = wbartlet(n)
  2. %y=wbartlet(n)
  3. %create a Triangle (Fejer, Bartlet) window
  4.  
  5. %       S.Halevy 7/31/92
  6. %       Copyright (c) 1992 by the MathWizards
  7.  
  8. if rem(n,2)==0
  9.   n2=n/2-1;
  10.   y=[0:n2 n2:-1:0].';
  11. else
  12.   n2=(n-1)/2;
  13.   y=[0:n2 n2-1:-1:0].';
  14. end
  15. y /= max(y);
  16.